<style>
    .layui-layout {
        position: fixed;
        z-index: 10000;
        left: 0;
        top: 0;
        width: 100%;
        height: 60px;
        /* background: url('../image/icon-h-line.jpg') repeat-x bottom #2fae85;*/
        box-shadow: 0 0 3px 3px rgba(0, 0, 0, 0.1);
    }

    .layui-header {
        position: fixed;
        top: 0;
        width: 100%;
        left: 0;
        background-color: #2F4056;
    }

    .logo {
        width: 160px;
        height: 60px;
    }

    .logo a {
        display: block;
        height: 60px;
        line-height: 60px;
        font-size: 18px;
        width: 100%;
        color: #ccc;
        font-weight: bold;
        
    }

    .page-left {
        float: left;
    }

    .page-right {
        float: right;
    }

    .page-header {
        padding-bottom: 0px;
        margin: 0px;
        border-bottom: 0px;
    }

    .layui-nav {
    }
    .layui-nav .layui-nav-item a{
        text-decoration: none;
    }

    .layui-this::after {
        background-color: #ffd217 !important;
    }

    .layui-nav-bar {
        background-color: #ffd217 !important;
    }

    .page-wb {
        width: 1200px;
        margin: 0 auto;
    }

    .page-wb:after {
        content: '';
        display: block;
        clear: both;
    }

    .layui-nav-child dd {
        display: block;
        line-height: 40px;
    }
    
    .system-search{
        float:right;
        margin-top: 12px; ;
    }
    .system-search input{
        background-color:hsla(0,0%,100%,.125);
        border:0;
        height: 28px;
        line-height: 28px;
        color: #f1f1f1;
        border-radius: 2px;
    }
    .system-search input:focus{
        border: 0;
        outline: 0;
        box-shadow:none;
        background-color: #fafbfc;
        color: #000;
        font-weight: 500;
    }
</style>

<div class="layui-layout">
    <div class="layui-header">
        <div class="page-wb page-header">
            <div class="logo page-left"><a href="{:U('Home/Index/index')}">智能电网技术门户</a></div>
            <ul class="layui-nav layui-bg-cyan page-left" id="main-navbar" lay-filter="">
                <li class="layui-nav-item "><a href="{:U('Home/Index/index')}"><i class="fa fa-home fa-fw"></i> {$Think.lang.home}</a></li>
                <li class="layui-nav-item "><a href="{:U('Home/Index/doc')}"><i class="fa fa-home fa-fw"></i> 文档 </a></li>
                <li class="layui-nav-item "><a href="http://10.10.61.21:3000/explore/repos" target="_blank"><i class="fa fa-home fa-fw"></i> 代码 </a></li>
                <li class="layui-nav-item "><a href="http://10.10.61.21/maven/#nexus-search;quick~top" target="_blank"><i class="fa fa-home fa-fw"></i> maven </a></li>
                <if condition="$login_user">
                <li class="layui-nav-item "><a href="{:U('Home/Item/index')}">{$Think.lang.my_item}</a></li>
                </if>
                <!--<li class="layui-nav-item"><a href="">{$Think.lang.my_favorite}</a></li>-->
                <li class="layui-nav-item">
                    <a href="javascript:;">技术门户</a>
                    <dl class="layui-nav-child"> <!-- 二级菜单 -->
                        <dd><a target="_blank" href="http://10.10.5.21/">技术研究中心</a></dd>
                        <dd><a target="_blank" href="http://10.10.43.43/">项目物资系统产品部</a></dd>
                        <dd><a target="_blank" href="http://10.10.15.219:8006/">移动互联网产品部</a></dd>
                        <dd><a target="_blank" href="10.10.14.115/">生产产品部</a></dd>
                    </dl>
                </li>
                <!--<li class="layui-nav-item"><a href="">社区</a></li>-->
            </ul>
            
            <ul class="layui-nav layui-bg-cyan page-right">
                <if condition="$login_user">
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                            {$login_user.username}
                        </a>
                        <dl class="layui-nav-child">
                            <dd><a href="{:U('Home/User/setting')}">{$Think.Lang.personal_setting}</a></dd>
                            <dd><a href="{:U('Home/User/exist')}">{$Think.Lang.logout}</a></dd>
                        </dl>
                    </li>
                    <else/>
                    <li class="layui-nav-item">
                        <a href="{:U('Home/User/login')}">{$Think.lang.index_login_or_register}</a></li>
                </if>
            </ul>
            <div class="system-search">
                <input id="searchInput" type="text" placeholder="输入关键字搜索">
            </div>
        </div>
    </div>
</div>

<script>
    $('#searchInput').on('keypress', function (event) {
        if(event.keyCode == "13"){
            location.href="?s=/Home/index/search&query="+$(this).val();
        }
    });
</script>
